package com.alpaak.common.enumtype;

public enum HttpStatusEnum {
    SUCCESS(200,"请求成功")
    ;

    private int statue;

    private String description;

    private HttpStatusEnum(int statue, String description){
        this.statue = statue;
        this.description = description;
    }

    private HttpStatusEnum(int statue){
        this.statue = statue;
    }

    public static HttpStatusEnum getHttpStatusEnum(int statue) {
        for(HttpStatusEnum x: HttpStatusEnum.values()) {
            if(x.getStatue()==statue) {
                return x;
            }
        }
        return null;
    }

    public int getStatue(){
        return this.statue;
    }

    public String getDescription(){
        return this.description;
    }
}
